import {onMounted, ref} from "vue";
import {getBannerApi} from "@/apis/home";

export function useBanner () {
    let bannerList = ref([])
    let getBanner = async () => {
        const res = await getBannerApi({ distributionSite: '2' })
        bannerList.value = res.result
    }

    onMounted(() => {
        getBanner()
    })

    return {
        bannerList
    }
}
